/** @format */

import { createSlice } from "@reduxjs/toolkit";

const AfengSlice = createSlice({
    name: "afeng",
    initialState: {
        nick: "admin",
        bread: '',
        collapsed: false
    },
    reducers: {
        changeNick(state, { payload }) {
            state.nick = payload;
        },
        changeBread(state, { payload }) {
            state.bread = payload
        },
        changeCollapsed(state, { payload }) {
            state.collapsed = payload
        }
    },
});

export const { changeNick, changeBread,changeCollapsed } = AfengSlice.actions

export default AfengSlice.reducer